/**
 * 
 * @param {*} app
 */
module.exports = app => {
  const { router, controller } = app;
  const auth = app.middleware.auth()
  // @(/api/user/:id)
  router.get('/user/:id', auth, controller.user.getUserById); // (id)获取用户信息
  // @(/api/login, data: {account, password})
  router.post('/login', controller.user.postLogin)
  router.get('/', controller.home.index)
}
